class ComponentFactory(object):
    _registry = {}
    def register(self, obj):
        self._registry[obj._name] = obj
    def get(self, name):
        return self._registry.get(name, None)
    def getComponents(self):
        return self._registry

cfactory = ComponentFactory()